Image capturing apparatus capable of detecting flicker due to periodic change in light amount of object, flicker detecting method, and non-transitory computer-readable storage medium

ABSTRACT

An image capturing apparatus includes a driving control unit configured to control driving of an image sensor, and a flicker detection unit configured to detect flicker, which is a periodic change in a light amount of an object, based on a signal output from the image sensor, wherein the driving control unit is configured to, if the image sensor outputs a flicker detection signal to be used in detecting the flicker, control the driving of the image sensor at n different frame rates, n being a natural number greater than or equal to 3, wherein a least common multiple of the n frame rates used in detecting the flicker is not same as any of the n frame rates, and wherein the flicker detection unit is configured to detect the flicker based on the flicker detection signal obtained at each of the n frame rates.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates to an image capturing apparatus, a flickerdetecting method, and a non-transitory computer-readable storage medium,and more particularly to a technique for calculating a characteristicrelated to a periodic change in light amount (referred to as flicker) ofan object.

Description of the Related Art

Image sensors included in image capturing apparatuses such as a digitalcamera and a mobile phone have been improved in sensitivity in recentyears. It is now becoming possible to obtain a bright image with lessobject blur by capturing the image of the object with a high shutterspeed (short exposure time) setting even indoors or in dark environmentsrelative to outdoors in daytime.

Fluorescent lamps commonly used as indoor light sources are known tocause flicker, which is a phenomenon that the light amount of an objectimage changes periodically, because of the commercial power sourcefrequency. If images of an object are captured with the shutter speedset high under such a flickering light source, exposure unevenness orcolor unevenness can occur within one image (screen), as well asexposure or color temperature variations between a plurality of imagesobtained by continuous shooting.

Japanese Patent Application Laid-Open No. 2014-220763 discusses atechnique for detecting flicker based on a plurality of imagessuccessively obtained at a rate that is the least common multiple offlicker frequencies (100 Hz and 120 Hz) due to two commercial powersource frequencies of 50 Hz and 60 Hz.

Light-emitting diodes (LEDs) have been increasingly used as lightsources in recent years. LEDs use a current supply method different fromthat of fluorescent lamps, and their driving current is controlled by arectifier circuit. LEDs therefore change in the light amount atdifferent cycles and with different waveforms from those of thecommercial power sources. While flicker occurs under an LED light sourceas with a fluorescent light source, the flicker has a light amountchange frequency different from under the fluorescent light source.

SUMMARY OF THE INVENTION

According to an aspect of the present invention, an image capturingapparatus includes a driving control unit configured to control drivingof an image sensor, and a flicker detection unit configured to detectflicker, which is a periodic change in a light amount of an object,based on a signal output from the image sensor, wherein the drivingcontrol unit is configured to, if the image sensor outputs a flickerdetection signal to be used in detecting the flicker, control thedriving of the image sensor at n different frame rates, n being anatural number greater than or equal to 3, wherein a least commonmultiple of the n frame rates used in detecting the flicker is not sameas any of the n frame rates, and wherein the flicker detection unit isconfigured to detect the flicker based on the flicker detection signalobtained at each of the n frame rates.

Further features of the present invention will become apparent from thefollowing description of embodiments with reference to the attacheddrawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating a configuration of a camera mainbody that is an image capturing apparatus according to an embodiment ofthe present invention, a lens unit, and a light emitting device.

FIG. 2 is a diagram illustrating a shutter speed setting (index) tableaccording to the present embodiment as an example.

FIG. 3 is a flowchart illustrating flicker reduction processingaccording to a first embodiment of the present invention.

FIG. 4 is a flowchart related to flicker detection processing accordingto the first embodiment of the present invention.

FIGS. 5A and 5B are diagrams illustrating a method for selecting aplurality of imaging cycles in detecting flicker according to the firstembodiment of the present invention as an example.

FIGS. 6A and 6B are diagrams illustrating a modification of the methodfor selecting a plurality of imaging cycles in detecting flickeraccording to the first embodiment of the present invention as anexample.

FIG. 7 is a diagram (graph) illustrating a relationship of the methodfor selecting imaging cycles for flicker detection and the number ofimaging cycles with a minimum difference between the imaging cyclesaccording to the present embodiment as an example.

FIG. 8 is a diagram illustrating a change in luminance based on imagessuccessively obtained by a global shutter method as an example.

FIG. 9 is a diagram illustrating a change in luminance based on imagessuccessively obtained by a rolling shutter method as an example.

FIG. 10 is a diagram illustrating the setting values of exposure time(shutter speed) for a first pattern of a plurality of imaging cycles forflicker detection according to the first embodiment of the presentinvention as an example.

FIG. 11 is a diagram illustrating the setting values of the exposuretime (shutter speed) for a second pattern of a plurality of imagingcycles for flicker detection according to the first embodiment of thepresent invention as an example.

FIG. 12 is a flowchart related to flicker reduction exposure timedetermination processing according to the first embodiment of thepresent invention.

FIGS. 13A and 13B are diagrams illustrating a method for setting anideal flicker reduction exposure time in the presence of flickerchanging in light amount at a predetermined light amount changefrequency according to the first embodiment of the present invention asan example.

FIG. 14 is a flowchart related to shutter speed selection processingaccording to the first embodiment of the present invention.

FIGS. 15A and 15B are diagrams illustrating a relationship between theshutter speed selected by the shutter speed selection processingaccording to the first embodiment of the present invention and an idealshutter speed for reducing the effect of flicker as an example.

FIGS. 16A and 16B are diagrams illustrating a notification screendisplayed on a display unit by display processing according to the firstembodiment of the present invention as an example.

FIG. 17 is a diagram illustrating a notification screen displayed by thedisplay processing according to the first embodiment of the presentinvention in a case where no flicker is detected as an example.

FIGS. 18A and 18B are diagrams illustrating a notification screendisplayed on a display unit by display processing according to a secondembodiment of the present invention as an example.

FIG. 19 is a diagram illustrating a screen for transitioning to flickerreduction processing during a live view display according to a thirdembodiment of the present invention as an example.

FIG. 20 is a diagram illustrating a method for sampling captured imagesbased on images successively obtained by the rolling shutter method asan example.

FIG. 21 is a diagram illustrating a change in flicker level in thepresence of a plurality of intermingled sampling periods as an example.

FIG. 22 is a diagram illustrating a case where the imaging cycles ofcaptured images to be used for flicker detection described withreference to FIGS. 5A and 5B are shifted to faster cycles as an example.

FIG. 23 is a diagram illustrating a case where the imaging cycles ofcaptured images to be used for flicker detection described withreference to FIGS. 6A and 6B are shifted to faster cycles as an example.

DESCRIPTION OF THE EMBODIMENTS Basic Configuration of Image CapturingApparatus

Embodiments of the present invention will be described below withreference to the attached drawings. A first embodiment will initially bedescribed. FIG. 1 is a block diagram illustrating a configuration of acamera main body 100 that is an image capturing apparatus according toan embodiment of the present invention, a lens unit 200, and a lightemitting device 300. One or more of the functional blocks illustrated inFIG. 1 may be implemented by hardware such as an application specificintegrated circuit (ASIC) and a programmable logic array (PLA). One ormore of the functional blocks may be implemented by a programmableprocessor (microprocessor or microcomputer) such as a central processingunit (CPU) and a micro processing unit (MPU) executing software. One ormore of the functional blocks may be implemented by a combination ofsoftware and hardware.

In the following description, the same piece of hardware can performoperations even if different functional blocks are described to performthe operations.

Components of the camera main body 100 will be described. The cameramain body 100 includes a frame memory (not illustrated) and functions asa storage unit that can temporarily store a signal (video signal) andfrom which the signal can be read as appropriate. Frame memories aretypically also referred to as random access memories (RAMs). Dual DataRate 3 Synchronous Dynamic RAMs (DDR3-SDRAMs) have often been used inrecent years. The use of such a frame memory enables various types ofprocessing.

An image sensor 101 is an imaging unit using a solid image sensor ofcharge accumulation type, such as a complementarymetal-oxide-semiconductor (CMOS) sensor and a charge-coupled device(CCD) sensor. The image sensor 101 can receive a light flux guided froman object into the camera main body 100 via the lens unit 200 andconvert the light flux into an electrical image signal. An image(signal) obtained using the image sensor 101 under driving control by aCPU 103 to be described below is handled as various image signals for alive view display, for flicker detection, and as a captured image forrecording. Since the electrical signal obtained by the image sensor 101has an analog value, the image sensor 101 also has a function ofconverting the analog value into a digital value. An evaluation value(photometric value) related to the brightness of the object can bedetected based on the image signal output from the image sensor 101. Anexposure time of the image sensor 101 can be controlled based on ashutter speed that can be set as an exposure control value related tothe image sensor 101.

A mechanical shutter 104 is a light shielding unit that can run in adirection parallel to a signal scanning direction of the image sensor101. The mechanical shutter 104 can control the exposure time of theimage sensor 101 by adjusting an exposure aperture formed by a pluralityof shutter blades included in the mechanical shutter 104 based on theforegoing shutter speed. The adjustment of the exposure time accordingto the present embodiment can be implemented using an electronicshutter, the mechanical shutter 104, or both the electronic shutter andthe mechanical shutter 104. The electronic shutter is implemented byadjusting signal reset and read timing of the image sensor 101.

A display unit 102 is a display device that a user can visually observe.The user can check an operation status of the camera main body 100 onthe display unit 102. For example, the display unit 102 displays a videoimage to which image processing has been applied based on the imagesignal of the object, and a setting menu. A liquid crystal display (LCD)or an organic electroluminescence (EL) display may be used as thedisplay unit 102. Images obtained by the image sensor 101 and settingconditions, such as exposure control values, can be displayed on thedisplay unit 102 in real time while capturing the images of the object,i.e., a live view display can be provided. The display unit 102according to the present embodiment includes a resistive or capacitivethin film device called touch panel, and also serves as an operationunit on which the user can make touch operations.

The CPU 103 is a control unit that can control the camera main body 100and accessory units attached to the camera main body 100 in acentralized manner. A read-only memory (ROM) and a RAM are connected tothe CPU 103. The ROM (not illustrated) is a nonvolatile recordingdevice, and records programs for operating the CPU 103 and variousadjustment parameters. The programs read from the ROM are loaded intothe volatile RAM (not illustrated) and executed. The RAM is typically alow-speed low-capacity device compared to the frame memory (notillustrated).

Next, details of the lens unit 200 will be described. The lens unit 200is an accessory attachable to and detachable from the camera main body100. The lens unit 200 is an interchangeable lens that includes a lensgroup 201 including a focus lens, a zoom lens, and a shift lens. Forexample, the focus lens included in the lens group 201 can make a focusadjustment to the object by adjusting the lens position in an opticalaxis direction of the lens.

A diaphragm 202 is a light amount adjustment member for adjusting thelight amount of the light flux guided from the object into the cameramain body 100 via the lens unit 200. In the present embodiment, thelight amount can be adjusted by adjusting an aperture diameter of thediaphragm 202. The light amount is adjusted by changing an aperturevalue serving as an exposure control value related to the aperturediameter of the diaphragm 202.

A lens processing unit (LPU) 203 is a control unit that controls variouscomponents of the lens unit 200. For example, the LPU 203 can controldriving of the lens group 201 and the diaphragm 202. The LPU 203 isconnected to the CPU 103 of the camera main body 100 via anot-illustrated terminal group, and can drive the components of the lensunit 200 based on control instructions from the CPU 103.

Next, details of the light emitting device 300 will be described. Thelight emitting device 300 is an external light emitting deviceattachable to and detachable from the camera main body 100 via anot-illustrated connection section on the camera main body 100. A strobeprocessing unit (SPU) 301 is a control unit that controls variouscomponents of the light emitting device 300, and capable mainly of lightemission control and communication control with the camera man body 100.The SPU 301 is connected to the CPU 103 of the camera main body 100 viaa not-illustrated contact group, and can drive various components of thelight emitting device 300 based on control instructions from the CPU103.

While the components of the image capturing apparatus according to thefirst embodiment of the present invention have been described above, thepresent invention is not limited to the foregoing configuration. Forexample, the camera main body 100 may include built-in devicescorresponding to the lens unit 200 and the light emitting device 300.

Method for Setting Shutter Speed

Next, a method for setting the shutter speed that is an exposure controlvalue for controlling the exposure time of the image sensor 101according to the present embodiment will be specifically described withreference to FIG. 2. FIG. 2 is a diagram illustrating a shutter speedsetting (index) table according to the present embodiment.

Shutter speed is typically known to be changeable in units of ½ or ⅓steps of light amount. In the present embodiment, to cope with flickeroccurring under light-emitting diode (LED) light sources that blinkperiodically at various frequencies, the shutter speed is adjustable infiner steps. Specifically, in the present embodiment, shutter speeds of1/8192.0 to 1/4871.0 sec can be adjusted in units of ¼ steps, and1/4096.0 to 1/2233.4 sec in units of ⅛ steps. Shutter speeds of 1/2048.0to 1/1069.3 sec can be adjusted in units of 1/16 steps, and 1/1024.0 to1/523.2 sec in units of 1/32 steps. Shutter speeds of 1/512.0 to 1/258.8sec can be adjusted in units of 1/64 steps, 1/256.0 to 1/128.7 sec inunits of 1/128 steps, and 1/128.0 to 1/50.0 sec in units of 1/256 steps.

In the shutter speed setting table illustrated in FIG. 2, some of theshutter speeds are omitted for the sake of viewability. The numericalindex values in the shutter speed setting table illustrated in FIG. 2are used in shutter speed selection processing for reducing flicker tobe described below.

The camera main body 100 according to the present embodimentpreferentially uses the electronic shutter to allow free setting of theshutter speed, ranging from the foregoing high shutter speed shorterthan 1/8000 sec to not-illustrated low shutter speeds longer than 1/50sec. The user can change the shutter system setting (to singly use theelectronic shutter or the mechanical shutter 104 or use the electronicshutter and the mechanical shutter 104 in combination) anytime, forexample, by making manual operations via a menu screen displayed on thedisplay unit 102.

Flicker Reduction Processing

Next, flicker reduction processing according to the present embodimentwill be described with reference to the flowchart illustrated in FIG. 3.FIG. 3 is a flowchart illustrating the flicker reduction processingaccording to the first embodiment of the present invention.

The flicker reduction processing is started in response to apredetermined operation, such as the user's manual operation based on amenu display displayed on the display unit 102. The flicker reductionprocessing according to the present embodiment is processing forcontrolling the occurrence of flicker-based variations in a moving imagesuch as a live view display by setting a shutter speed (i.e., exposuretime) that reduces the effect of detected flicker. The flicker reductionprocessing according to the present embodiment is however not limitedthereto. For example, the camera main body 100 may be configured toreduce flicker by applying a gain to reduce variations to the imageaside from adjusting the shutter speed.

When the flicker reduction processing is started, the CPU 103 initiallyrepeats the processing of step S301 until flicker detection processingis started. In step S301, in a case where it is determined that theflicker detection processing is started (YES in step S301), theprocessing proceeds to step S302. In step S302, the CPU 103 performs theflicker detection processing. Details of the flicker detectionprocessing will be described below.

In step S303, the CPU 103 determines whether flicker is detected basedon the result of the processing of step S302. In step S303, in a casewhere it is determined that flicker is detected (YES in step S303), theprocessing proceeds to step S304. In a case where it is determined thatno flicker is detected (NO in step S303), the processing proceeds tostep S306. It is determined that flicker is detected if flicker ofpredetermined level or higher has occurred. A method for calculating theflicker level will be described below.

In step S304, the CPU 103 determines an exposure time (shutter speed)that allows the effect of the detected flicker to be reduced (flickerreduction exposure time determination processing). Details of theflicker reduction exposure time determination processing will bedescribed below.

In step S305, the CPU 103 performs shutter speed selection processingfor selecting a shutter speed that can reduce the effect of the flickerbased on information about the exposure time suitable for flickerreduction determined in step S304. Details of the shutter speedselection processing will be described below.

In step S306, the CPU 103 performs display processing for displaying theresult of the flicker detection (i.e., whether flicker is detected) anda value selectable as the shutter speed that can reduce the effect ofthe flicker as a result of the processing of steps S304 and S305.Details of the display processing will be described below. By suchflicker reduction processing, an image with the effect of flickerreduced can be obtained, and image display and recording can beperformed based on the image, regardless of the frequency of theflicker.

Flicker Detection Processing

Next, the flicker detection processing according to the presentembodiment will be described with reference to FIG. 4. As describedabove, LED light sources, unlike light sources such as a fluorescentlamp, cause changes (blinking) in the light amount, i.e., flicker, at afrequency different from the power supply frequency for driving thelight sources since the driving current thereof is controlled by arectifier circuit. In detecting flicker caused by light sources such asan LED light source, the frequencies targeted for detection aretherefore unable to be narrowed down to certain numerical values likethe driving power supply frequency. The occurrence of flicker istherefore to be analyzed over a wide range of frequencies.

If the light amount change frequency of flicker (blinking cycle of thelight source) is the same as or an integer multiple of the imaging cyclein successively capturing images of an object (hereinafter, such a statewill be referred to as synchronization), changes (blinking) in the lightamount between the successively obtained images are small. In such acase, for example, a live view display of successively displaying theimages is free of a drop in image quality like flicker-based variations.However, a still image obtained by imaging at a given shutter speed cansuffer exposure unevenness due to flicker. Moreover, even if the imagingframe rate of the images for the live view display is the same as thelight amount change frequency of flicker, a moving image for recordingobtained at a different frame rate can suffer exposure unevenness orluminance unevenness due to the flicker.

There is a known method for identifying the light amount changefrequency of flicker by detecting and comparing differences in the lightamount (brightness level) between the images obtained by successiveimaging. If such a method is used to identify the light amount changefrequency of flicker, the light amount change frequency of the flickerand the imaging cycle (frame rate) are desirably adjusted to not besynchronous.

In the present embodiment, the occurrence of flicker is thus detected byanalyzing the light amount change frequency of flicker at a plurality offrequencies (imaging cycles). Such a method can prevent the light amountchange frequency of flicker and the imaging cycle from being fullysynchronous and enables effective flicker detection processing over awide range of frequencies by analyzing the light amount change frequencyof the flicker at a plurality of imaging cycles.

FIG. 4 is a flowchart related to the flicker detection processingaccording to the first embodiment of the present invention. Asillustrated in FIG. 4, in step S401, the CPU 103 performs photometricoperations on the object (object light measurement) to determineexposure in capturing images of the object for the flicker detectionprocessing. Any method may be used for the photometric operations. Forexample, in the present embodiment, the CPU 103 obtains an evaluationvalue based on an average of image signals obtained by performing chargeaccumulation for photometric operations using the image sensor 101. TheCPU 103 then determines a representative luminance (photometric value)of the object as the result of the light measurement based on theobtained evaluation value. To calculate the photometric value, the angleof view corresponding to the image signals is divided into a pluralityof blocks. Signals output from pixels corresponding to each block areaveraged, and the averages determined in the respective blocks arearithmetically averaged to calculate the photometric value(representative luminance). The photometric value is in units such thatBv=1 in the Additive System of Photographic Exposure (APEX) systemcorresponds to one step of the luminance value. However, other units maybe used.

In step S402, the CPU 103 adjusts the imaging cycle to an imaging cyclefor flicker detection (non-frame rate). Details of a method foradjusting the imaging cycle for flicker detection will be describedbelow.

In step S403, the CPU 103 determines exposure control values (changesexposure) based on the determined photometric value. In the presentembodiment, the exposure control values refer to parameters capable ofadjusting the brightness of the captured image of the object. Theexposure control values include the shutter speed (i.e., accumulationtime), an aperture value, and imaging sensitivity (InternationalOrganization for Standardization (ISO) speed). The determined exposurecontrol values are stored in the RAM described above. The camera mainbody 100 changes its exposure and starts to obtain images for flickerdetection.

In step S404, the CPU 103 determines whether the luminance of theobtained images changes (i.e., whether flicker occurs). The CPU 103determines the presence or absence of a change in the luminance based onthe obtained images, since flicker is unable to be correctly detected ifthe blinking cycle of the light source and the imaging cycle of theobject are synchronous as described above. In a case where it isdetermined that no change in luminance is detected in the obtainedimages (NO in step S404), the processing proceeds to step S406. In otherwords, flicker detection operations at the current frame rate (imagingcycle) are skipped based on the determination that the imaging cycle andthe light amount change frequency of the flicker related to the objectare synchronous or there is no flicker.

In a case where a change in luminance is detected in the obtained images(YES in step S404), the processing proceeds to step S405. In step S405,the CPU 103 analyzes (detects) the occurrence of flicker at a pluralityof different frequencies. Details of the method of detecting flicker ata plurality of frequencies in step S405 will be described below.

In step S406, the CPU 103 determines whether flicker detection has beencompleted with a predetermined number (n) of imaging cycles. In a casewhere flicker detection is determined to not have been completed withthe predetermined number of imaging cycles (NO in step S406), theprocessing returns to step S402. In step S402, the CPU 103 changes theimaging cycle (frame rate). The processing of step S403 and thesubsequent steps is repeated.

In a case where flicker detection is determined to have been completedwith the predetermined number of imaging cycles (YES in step S406), theprocessing proceeds to step S407. In step S407, the CPU 103 identifiesthe frequency of the flicker of the object based on the determinationresults in step S405. In the processing of step S407, the occurrence offlicker has been detected at a plurality of different frequencies with aplurality of imaging cycles (frame rates).

The CPU 103 compares the levels of flicker detected at respectivefrequencies, and identifies the flicker of the frequency where the levelis the highest as the final detection result of the currently occurringflicker of the object. In the present embodiment, the magnitudes ofchanges in the light amount (the amplitudes of curves representingregular changes in the light amount) are compared as the flicker levels.However, this is not restrictive. For example, the camera main body 100may be configured to compare the degrees of stability of changes in thelight amount aside from the flicker levels.

Now, the imaging cycles (frame rates) for flicker detection mentionedabove will be specifically described. As described above, the cameramain body 100 according to the present embodiment performs the flickerdetection processing at a plurality of imaging cycles. Suppose, forexample, that the camera main body 100 detects the light amount changefrequency of flicker by switching the imaging cycle between 100 fps and120 fps. Initially, take the case of detecting the light amount changefrequency of flicker at an imaging cycle of 100 fps. In such a case,flicker changing in light amount at a frequency of k×100 Hz (k is anatural number), like 100 Hz, 200 Hz, and 300 Hz that are integermultiples of the imaging cycle of 100 fps, are unable to be correctlydetected because of synchronization between the imaging cycle and thelight amount change frequency of the flicker. Now, take the case ofdetecting the light amount change frequency of flicker at an imagingcycle of 120 fps. In such a case, flicker changing in light amount at afrequency of m×120 Hz (m is a natural number), such as 120 Hz, 240 Hz,and 360 Hz that are integer multiples of the imaging cycle of 120 fps,are unable to be correctly detected because of synchronization betweenthe imaging cycle and the light amount change frequency of the flicker.Frequencies of 600 Hz and 1200 Hz that satisfy both the conditions k×100Hz (k is a natural number) and m×120 Hz (m is a natural number) arecommon multiples of 100 Hz and 120 Hz. Flicker changing in light amountat such frequencies is unable to be correctly detected by using imagesobtained with either of the imaging cycles of 100 fps and 120 fps sincethe light amount change frequency of the flicker is synchronous withboth the imaging cycles of 100 fps and 120 fps.

For example, light sources including a rectifier circuit, like an LEDlight source, typically have an adjusted power supply frequency in therange of 50 Hz to 1000 Hz. Some LED light sources can thus flicker atthe foregoing light amount change frequency of 600 Hz, and the flickercannot be correctly detected depending on the imaging cycle. In otherwords, even if flicker detection is performed using images obtained withtwo respective imaging cycles, flicker cannot be detected correctly atsome frequencies in a wide range of frequencies at which LED lightsources can flicker.

In the foregoing example, flicker changing in light amount at exactlythe same frequency at an integer multiple of an imaging cycle (framerate) has been described. However, the accuracy of flicker detection candrop even if the flicker frequency is not the same as an integermultiple of the imaging cycle. Suppose, for example, that flickerchanges in light amount at a frequency near an integer multiple of theimaging cycle in obtaining images for flicker detection. Such flickersometimes takes time to be detected or is unable to be correctlydetected since exposure unevenness and other effects on the images aresmall.

In the present embodiment, to effectively detect flicker that can occurunder an LED light source in a wide range of frequencies, the number nof imaging cycles (frame rates) used during flicker detection isadjusted to satisfy a condition that “n>3 (n is a natural number)”. Inother words, the flicker detection is performed at n imaging cycles,where n is a natural number of 3 or more.

The higher the light amount change frequency of flicker to be detected,the more accurately the light amount change frequency of the flicker canbe detected by increasing the number n of imaging cycles to be used forflicker detection. However, increasing the number of imaging cycles tobe used for flicker detection can increase the duration of the flickerdetection, causing issues of a release time lag and a drop in thedisplay frame rate of the live view image. In the present embodiment,the number n of imaging cycles to be used for flicker detection is setto 3 as the number of samples enabling effective detection of flickerthat can occur under light sources considered to be often used like anLED light source.

Next, a method of selecting specific numerical values of the respectiven imaging cycles will be described.

In the present embodiment, a reference imaging cycle is initially set.For example, a reference imaging cycle is assumed to be 100 fps. Lightamount change frequencies of flicker synchronous with the imaging cycleof 100 fps are integer multiples of 100 Hz. Flicker occurring at suchlight amount change frequencies are unable to be correctly detected.

If images are sampled at an imaging cycle of 200 fps that is twice thereference imaging cycle of 100 fps, the same issue as during sampling atthe reference imaging cycle of 100 fps occurs. In other words, if aninteger multiple of the imaging cycle for sampling images for flickerdetection and an integer multiple of the light amount change frequencyof flicker are the same, the flicker is unable to be correctly detectedbased on the sampled images because of synchronization between theimaging cycle and the light amount change frequency.

In the present embodiment, the n (in the present embodiment, n=3)imaging cycles are set so that the remaining (n−1) imaging cycles (inthe present embodiment, two) fall between the reference imaging cycleand an imaging cycle that is the immediate integer multiple of thereference imaging cycle. Take, for example, the case of detectingflicker at three imaging cycles with a reference imaging cycle of 100fps. In such a case, the plurality of imaging cycles for flickerdetection is set so that the remaining imaging cycles other than thereference imaging cycle of 100 fps fall are from 100 fps to 200 fps. Inthe present embodiment, the imaging cycles (frequencies) are set so thatthe least (or lowest) common multiple of the n imaging cycles is greaterthan or equal to a predetermined frequency. For example, the imagingcycles (frequencies) are set so that the least common multiple of the nimaging cycles (frame rates) is greater than or equal to a predeterminedfrequency of 10000 Hz, since LED light sources typically have a blinkingfrequency of 10000 Hz or less. Moreover, in order for the camera mainbody 100 to be able to reduce the effect of flicker, the imaging cycles(frequencies) are set so that the least common multiple of the n imagingcycles is greater than a predetermined frequency that is the reciprocalof the highest settable shutter speed of the camera main body 100. Withsuch a configuration, the camera main body 100 can effectively detectflicker occurring under a light source that changes in light amount at ahigh frequency (for example, 200 Hz or more) like an LED light source,and reduce the effect of the detected flicker by adjusting the shutterspeed.

FIGS. 5A and 5B are diagrams illustrating a method of selecting aplurality of imaging cycles in detecting flicker according to the firstembodiment of the present invention as an example. To accurately detectthe light amount change frequency of flicker, the imaging cycles are setto values far from each other as much as possible so that one of theimaging cycles and the light amount change frequency of the flicker tobe detected (blinking cycle of the light source) can have a differencethat enables favorable flicker detection. In the present embodiment, asillustrated in FIG. 5A, flicker is detected at imaging cycles set to beseparated in steps of 2 to the one-third power so that the range ofimaging cycles for detection (100 fps to 200 fps) is divided atpredetermined intervals.

Specifically, in the present embodiment, as illustrated in FIG. 5A, thethree imaging cycles are: the reference imaging cycle of 100 fps; 100fps×2{circumflex over ( )}(⅓)=125.99 fps 126 fps; and 100fps×2{circumflex over ( )}(⅔)=158.74 fps≈159 fps. The three imagingcycles are different in steps of 2{circumflex over ( )}(⅓)=1.2599≈1.26times, or approximately 26%. With such a configuration, even in a casewhere a wide frequency range of 50 to 1000 Hz or more is divided into aplurality of ranges for flicker detection, the ranges do not deviategreatly from the detection target frequencies. One of the imaging cycleshas a sufficiently large difference from the light amount changefrequency of flicker to be detected. In other words, in setting nimaging cycles and detecting flicker at each of the imaging cycles, adrop in detection accuracy at each detection target frequency can beprevented by setting the imaging cycles in steps of 2 to the one-nthpower.

FIG. 5B is a diagram illustrating the correspondence of the light amountchange frequencies of flicker to be detected with the n imaging cyclesas an example. In the present embodiment, flicker is detected based onimages obtained at one of the n imaging cycles that corresponds to thefarthest frequency from the light amount change frequency of the flickerto be detected. Specifically, in the present embodiment, flicker isdetected based on data table illustrated in FIG. 5B, where light amountchange frequencies of flicker from 50 Hz to 1008 Hz are divided intoranges (A) to (P) for the three imaging cycles illustrated in FIG. 5A.

In the present embodiment, the effect of flicker is reduced by capturingimages of the object at a shutter speed that is the reciprocal of thelight amount change frequency of the flicker and setting an imagingperiod synchronous with the light amount change frequency of theflicker. If there is a deviation between the ideal shutter speedsynchronous with the light amount change frequency of the flicker andthe actual shutter speed, the effect of the flicker (such as exposureunevenness) on the images becomes more significant when the actualshutter speed is low than when the actual shutter speed is high.Suppose, for example, that shutter speeds of 1/101 sec and 1/1001 secare set for flicker having a light amount change frequency of 100 Hz and1000 Hz, respectively, with a deviation as much as 1 Hz from therespective ideal shutter speeds for reducing the effect of the flicker.In either case, the deviation between the ideal shutter speed that canreduce the effect of the flicker and the actual shutter speed is as muchas 1 Hz, whereas the deviation is equivalent to 1% of the shutter speedof 1/100 sec and 0.1% of the shutter speed of 1/1000 sec. In otherwords, the higher the shutter speed, the smaller the effect of theflicker on the images with respect to a change of 1 Hz in the shutterspeed. Meanwhile, a low shutter speed increases the period for whichflicker-based changes in light amount are captured, and thus images withsmoothened changes in light amount are more likely to be obtained. Thedetection ranges of the flicker at low frequencies may therefore beadjusted to be wider as appropriate if the flicker to be detected has alight amount change frequency such that the flicker is reduced atshutter speeds of a predetermined value or less (for example, as long as1/25 sec or longer).

In the present embodiment, as illustrated in FIG. 5B, detection targetranges are set so that the range of light amount change frequencies offlicker to be detected is divided into a plurality of ranges and thefrequencies of these successive ranges vary in steps of 2{circumflexover ( )}(⅓)=1.26 times. For example, the range (N) illustrated in FIG.5B is a detection target range intended to detect flicker from 159 to200 Hz, and the next range (C) is from 200 to 252 Hz that areapproximately 1.26 times the frequencies of the range (N).

As illustrated in FIG. 5B, adjoining ones of the ranges of the lightamount change frequencies of flicker to be detected at the same imagingcycle differ by approximately twice. For example, the ranges (A), (B),and (C) illustrated in FIG. 5B that correspond to the imaging cycle of159 fps have detection target frequencies of 50 Hz to 63 Hz, 100 Hz to126 Hz, and 200 Hz to 252 Hz, respectively. The reason is to take intoaccount the fact that changes in light amount due to flicker at integermultiples of frequency are the same. With such a configuration, theimage capturing apparatus according to the present embodiment can detectflicker over a wide range of frequencies with stable accuracy.

In the present embodiment, the imaging cycles in detecting flicker aredescribed to differ by m to the one-nth power (m and n are naturalnumbers). In the foregoing description, m is two (m=2). However, this isnot restrictive. For example, the imaging cycles may be set with m=3. Insuch a case, differences between the imaging cycles are greater, and thedetection accuracy with respect to the light amount change frequency offlicker to be detected can be lower than with m=2. However, compared tothe case where m=2, the imaging cycles set with m=3 can reduce detectiontime if the range of detection target frequencies is the same. Such asetting is thus suitable in the case of detecting flicker over a widerrange of light amount change frequencies.

Now, a different method (modification) of selecting n imaging cyclesthan the foregoing will be described with reference to FIGS. 6A and 6B.FIGS. 6A and 6B are diagrams illustrating the modification of the methodof selecting a plurality of imaging cycles in detecting flickeraccording to the first embodiment of the present invention as anexample. A difference from this modification and the foregoing exampledescribed with reference to FIGS. 5A and 5B lies in the method ofsetting n imaging cycles in the range of imaging cycles for detection.

In this modification, as illustrated in FIG. 6A, the range of imagingcycles for detection is equally divided to set a plurality of imagingcycles. More specifically, with the range of imaging cycles for flickerdetection (100 fps to 200 fps) as 100%, n imaging cycles are set toinclude imaging cycles 33% and 66% different from the reference imagingcycle of 100 fps. Specifically, the three imaging cycles are: thereference imaging cycle of 100 fps; 100 fps×1.333=133.33 fps 133 fps;and 100 fps×1.666=166.66 fps 167 fps.

Differences between the foregoing three imaging cycles are133.333/100=1.33333, 166.666/133.33=1.25, and 200/166.666=1.2. Theimaging cycles are thus 20% or more different from each other.

FIG. 6B is a diagram illustrating the correspondence of the light amountchange frequencies of flicker to be detected with the n imaging cyclesillustrated in FIG. 6A as an example. As illustrated in FIG. 6B, in thismodification, flicker is also detected based on images obtained at oneof the n imaging cycles that corresponds to the farthest frequency fromthe light amount change frequency of the flicker to be detected as inFIG. 5B described above.

Differences between the imaging cycles for flicker detection will now bedescribed. As described above, there is a relationship such that thegreater the number of imaging cycles for flicker detection increases,the smaller the differences between the imaging cycles and the longerthe sampling time. To accurately detect flicker in a short time, thedifferences between the imaging cycles are desirably as large aspossible and the number of imaging cycles for sampling as small aspossible within an extent where a wide range of light amount changefrequencies of flicker can be detected.

A case where the range between the reference imaging cycle and a cycletwice the reference imaging cycle is divided in steps of 2 to theone-nth power as described with reference to FIGS. 5A and 5B will bedescribed with the range as 100%. In such a case, the imaging cycles forflicker detection vary at intervals expressed by the following Eq. 1:

{2{circumflex over ( )}(1/n)−1}×100[%].  (Eq. 1)

Now, suppose that the range between the reference imaging cycle and thecycle twice the reference imaging cycle is divided in steps of 100/n [%]as described with reference to FIGS. 6A and 6B, with the range as 100%.

As calculated for n=3, with respect to the imaging cycle different fromthe reference imaging cycle by 100%×(n−1)/n and the imaging cycledifferent from the reference imaging cycle by twice, each differencebecomes the smallest. The difference is given by the following Eq. 2:

$\begin{matrix}{{\left\lbrack {200/\left\{ {{100} + \left\{ {100 \times {\left( {n - 1} \right)/n}} \right\} - 1} \right.} \right\rbrack \times {100\lbrack\%\rbrack}} = {{\left\{ {{200{n/\left( {{200n} - {100}} \right)}} - 1} \right\} \times {100\lbrack\%\rbrack}} = {{\left\{ {{2{n/\left( {{2n} - 1} \right)}} - 1} \right\} \times {100\lbrack\%\rbrack}} = {\left\{ {1/\left( {{2n} - 1} \right)} \right\} \times {{100\lbrack\%\rbrack}.}}}}} & \left( {{Eq}.2} \right)\end{matrix}$

In other words, if the imaging cycles vary in steps of 100/n [%], theimaging cycles (frame rates) used for flicker detection differ from eachother at a ratio of {2n/(2n−1)−1}×100% or more. In the camera main body100 according to the first embodiment of the present invention, theimaging cycles (frame rates) used for flicker detection differ from eachother by at least {2n/(2n−1)−1}×100%. This also applies to the foregoingcase of dividing the range from the reference imaging cycle to the cycletwice the reference imaging cycle in steps of 2 to the one-nth powerwith the range as 100%.

FIG. 7 provides a graphic representation of the relationship of themethods of selecting imaging cycles and the number of imaging cycleswith differences between the imaging cycles based on the foregoing Eqs.1 and 2. FIG. 7 is a chart (graph) illustrating the relationship of themethods of selecting imaging cycles for flicker detection according tothe present embodiment and the number of imaging cycles with differencesbetween the imaging cycles as an example. As illustrated in FIG. 7,differences between the imaging cycles depending on the number n ofimaging cycles are smaller in Eq. 2 illustrated by a solid line than inEq. 1 illustrated by a broken line. Such a condition also applies toeven greater numbers n of imaging cycles not illustrated in FIG. 7. Inother words, while two different methods for selecting imaging cycleshave been described above, it can be seen that differences between theimaging cycles are greater than or equal to the values given by Eq. 2regardless of which method is used. While two examples of sets ofimaging cycles for flicker detection have been described, the imagingcycles for flicker detection are not limited thereto. The imagecapturing apparatus according to the present embodiment can beconfigured to set three or more, a natural number n of different imagingcycles (frame rates) such that the least common multiple of the nimaging cycles is not the same as any of the n imaging cycles, as longas flicker can be accurately detected. For example, if 50 Hz, 150 Hz,and 300 Hz are set as the imaging cycles for flicker detection, flickeris unable to be correctly detected since changes in luminance in theimages obtained at the respective imaging cycles in the same period arethe same. The image capturing apparatus according to the presentembodiment desirably adjust the imaging cycles for flicker detection tobe high rates of 100 fps or more each so that the least common multipleof the imaging cycles does not fall below 10000 Hz that can be employedas the blinking frequency of a light source such as an LED light source.

Next, details of the processing for analyzing (detecting) the occurrenceof flicker at a plurality of different frequencies in the foregoing stepS405 will be described. The image capturing apparatus according to thepresent embodiment extracts changes in luminance over time based on theluminance of successively obtained images, and analyzes the periodicityof the changes in luminance to detect the light amount change frequencyof flicker. The change in luminance in the images differ depending onthe method for obtaining the images to be used for detection. Forexample, when images of an object are captured by a global shuttermethod using a CCD sensor and when the images are captured by a rollingshutter methods using a CMOS sensor, the change in luminance in theimages differ between the cases. The ways the luminance changes when theimages are obtained by the respective methods described above will bedescribed below.

A change in the luminance of images obtained by the global shuttermethod will initially be described with reference to FIG. 8. FIG. 8 is adiagram illustrating a change in luminance based on images successivelyobtained by the global shutter method as an example. If an image of anobject affected by the blinking of a light source due to flicker iscaptured, a captured image affected by the intensity of the blinking ofthe light source is obtained. Measuring the luminance of the entirecaptured image provides a photometric value affected by the intensity ofthe blinking of the light source.

As employed herein, the luminance may refer to a luminance signalcalculated by multiplying R, G1, G2, and B color signals in a raw imageof Bayer arrangement by specific coefficients, or the R, G1, G2, and Bcolor signals themselves. A color signal or luminance signal obtainedfrom a sensor array of other than the Bayer arrangement may be used.

Differences or ratios in luminance (photometric value) betweensuccessively captured images obtained by the foregoing method are thencalculated. Alternatively, an average image of a plurality of images isset as a reference image, and differences or ratios in the luminance ofthe respective images with respect to the reference image may becalculated. By plotting changes in the luminance of the images obtainedby such a method, transition of the changes in the luminance of theimages as illustrated in FIG. 8 can be detected.

Next, a change in luminance of images obtained by the rolling shuttermethod will be described with reference to FIG. 9. FIG. 9 is a diagramillustrating a change in luminance based on images successively obtainedby the rolling shutter method as an example. If a sensor is driven bythe rolling shutter method, exposure and reading timing varies from onesensor line to another. The effect of the blinking of the light sourcedue to flicker thus varies line by line, and changes in luminance occurdifferently in the vertical direction of the image.

If the sensor (in the present embodiment, image sensor 101) is driven bythe rolling shutter method, changes in luminance due to the blinking ofthe light source can thus be extracted by obtaining integral values ofthe captured images line by line. Specifically, as illustrated in FIG.9, changes in the luminance of the same lines in successive (N−1)th andNth frames images obtained by successively capturing images of theobject are extracted. Here, the integral values of the captured imagescorresponding to the Nth and (N−1)th frames are calculated line by line.As described above regarding the global shutter method, the integratedvalues may be those of luminance signals obtained by multiplying thecolor signals by specific coefficients, or the integral values of thecolor signals themselves. The integral values of the Nth frame and thoseof the (N−1)th frame are compared line by line to calculate differencesor ratios. Changes in luminance in the vertical direction of thecaptured images (i.e., in the scanning direction of the sensor) asillustrated in FIG. 9 can thereby be detected.

The frames to be compared do not need to be two successive ones. Forexample, an average image may be obtained by averaging the signal valuesof a plurality of captured images, and the average image is set as areference image. Changes in luminance in the vertical direction of theimages may be calculated by comparing the integral values of therespective lines of the reference image with those of the respectivelines of the Nth frame.

By analyzing the captured images obtained by the rolling shutter methodin the foregoing manner, transition of the changes in luminance in thevertical direction of the captured images as described above can bedetected. The changes in the luminance represent the blinking of thelight source (i.e., changes in the light amount of the flicker).

Next, a technique for analyzing the frequency of changes in luminancefrom the transition of changes in the luminance of the images will bedescribed. Among typical techniques for converting a signal changing ina temporal direction into frequency components, one is a Fouriertransform. Here, a signal f(t) changing in a temporal direction isconverted into a frequency-based function F(ω).

F(ω)=∫−∞∞f(t)e ^(−iωt) dt.  (Eq. 3)

Focus attention on the exponential function in Eq. 3. Exponentialfunctions are known to be expandable into trigonometric functionsrepresenting the real part and the imaginary part based on arelationship between Maclaurin expansion and nth derivatives of thetrigonometric functions (see the following Eq. 4):

F(w)=∫f(t)·cos(ωt)dt+j×(−1)×f(t)·sin(ωt)dt.  (Eq. 4)

Since an integration can be performed assuming that f(t) is thetransition of changes in the image signals and dt is the samplinginterval of the transition of changes, Eq. 4 can be expressed by thefollowing Eq. (5):

F(ω)=A(ω)+j×B(ω).  (Eq. 5)

This is a complex function of a frequency ω so that the magnitudethereof is calculated as |F(ω)|. |F(ω)| has a large value if luminancechange components of the frequency ω are included in the transition ofchanges in the luminance of the images. |F(ω)| has a small value ifluminance change components of the frequency ω are not included in thetransition of changes in the luminance of the images. In other words,|F(ω)| can be regarded as a flicker level with respect to eachfrequency. The presence or absence of changes in luminance due to theblinking of the light source (i.e., the light amount change frequency offlicker) can thus be detected in a wide range of frequencies bycalculating frequency components over a wide range of frequenciestargeted for detection, using the foregoing Eq. 5.

The transition of changes in luminance does not cover one or moreperiods of the blinking of the light source (one or more periods of achange in the light amount of the flicker), the target frequency isunable to be favorably detected but erroneously detected as anotherfrequency. It is therefore desirable to continue capturing images of theobject for one or more periods of the target frequency, and detect theforegoing frequencies (i.e., the light amount change frequency offlicker) based on the captured images.

Next, the exposure operation during flicker detection in foregoing stepS403 will be specifically described. As described above, if the imagingcycle in detecting flicker is synchronous with the blinking frequency ofthe light source (the light amount change frequency of the flicker), theflicker is difficult to effectively detect based on the sampled images.Aside from the imaging cycle, flicker is also difficult to detect if theexposure time in capturing the object (i.e., shutter speed) issynchronous with the blinking frequency of the light source, since theimages obtained in such a state do not produce effective changes inluminance.

In the present embodiment, the exposure time (shutter speed) is thus setto be synchronous with the imaging cycle in performing the flickerdetection operation so that the exposure time will not be synchronouswith a frequency other than the imaging cycle. Specifically, indetecting flicker, images of the object are desirably captured at anexposure time (shutter speed) 1/N (N is an integer) of the imaging cycle(frame rate) for detection.

FIG. 10 is a diagram illustrating the setting values of the exposuretime (shutter speed) for a first pattern of a plurality of imagingcycles for flicker detection according to the first embodiment of thepresent invention as an example. If, for example, the plurality ofimaging cycles for flicker detection is 100 fps, 126 fps, and 159 fps asdescribed above, images of the object are captured by setting theexposure time as illustrated in FIG. 10.

FIG. 11 is a diagram illustrating the setting values of the exposuretime (shutter speed) for a second pattern of the plurality of imagingcycles for flicker detection according to the first embodiment of thepresent invention as an example. If, for example, the plurality ofimaging cycles for flicker detection is 100 fps, 133 fps, and 167 fps asdescribed above, images of the object are captured by setting theexposure time as illustrated in FIG. 11.

As illustrated in FIGS. 10 and 11, images for flicker detection areobtained at exposure times 1/N (N is an integer) of the reciprocals ofthe imaging cycles (frame rates) for flicker detection. This can preventsynchronization between the exposure times and the light amount changefrequency of the flicker.

If the exposure condition varies depending on the light amount changefrequency of flicker, the detected flicker levels differ from eachother, thereby reducing the detection accuracy. In the presentembodiment, the exposure operation is thus performed at the foregoingplurality of imaging cycles based on the result of the light measurementin step S401. This can reduce variations in the exposure amount from oneexposure cycle to another, and enables stable detection of flickerlevels.

With such a configuration, the image capturing apparatus according tothe present embodiment can stably and effectively detect flicker over awide range of frequencies that can be the light amount change frequencyof flicker.

Next, details of the flicker reduction exposure time determinationprocessing performed in the foregoing step S304 will be described withreference to FIG. 12. FIG. 12 is a flowchart related to the flickerreduction exposure time determination processing according to the firstembodiment of the present invention. In step S1201, the CPU 103initially reads the light amount change frequency of the flickerdetected by the flicker detection processing performed in the foregoingstep S302 from the RAM.

In step S1202, the CPU 103 calculates an ideal exposure time (idealflicker reduction exposure time) IdealFlkExpTime for reducing the effectof the detected flicker based on the reciprocal of the light amountchange of the flicker read in step S1201. For example, if the lightamount change frequency of the detected flicker is 540.0 Hz,IdealFlkExpTime=1/540.0.

In step S1203, the CPU 103 obtains a currently set shutter speed(current shutter speed) CurTv. An example of the current shutter speedCurTv is the shutter speed set by the user's manual operation. In thepresent embodiment, suppose that the imaging mode of the camera mainbody 100 is set to a manual mode in advance, and a plurality of exposurecontrol values (parameters) is all manually set by the user.

In step S1204, the CPU 103 performs initialization processing forinteger multiplication of the ideal flicker reduction exposure timeIdealFlkExpTime. Specifically, in step S1204, the CPU 103 sets aninteger N=1, and stores information about the ideal flicker reductionexposure time IdealFlkExpTime before integer multiplication aspreviously set ideal flicker reduction exposure time PreIdealFlkExpTime.

In step S1205, the CPU 103 compares the currently set shutter speedCurTv obtained in step S1203 with the ideal flicker reduction exposuretime IdealFlkExpTime. If the value of CurTv is less than or equal tothat of IdealFlkExpTime (i.e., the exposure time is shorter) (YES instep S1205), the processing proceeds to step S1207. On the other hand,if the value of CurTv is greater than that of IdealFlkExpTime (theexposure time is longer) (NO in step S1205), the processing proceeds tostep S1206.

In step S1206, the CPU 103 stores the current ideal flicker reductionexposure time IdealFlkExpTime as the previously set ideal flickerreduction exposure time PreIdealFlkExpTime, increments the integer N byone, and multiplies the ideal flicker reduction exposure timeIdealFlkExpTime by the integer N. Specifically, in step S1206, the CPU103 substitutes IdealFlkExpTime into PreIdealFlkExpTime, increments N toN+1, and multiplies IdealFlkExpTime by the integer N. The processing ofstep S1206 (ideal flicker reduction exposure time integer multiplicationprocessing) is repeated until the currently set shutter speed becomesless than or equal to the ideal flicker reduction exposure time(CurTv<IdealFlkExpTime) in step S1205. In other words, the processing ofstep S1206 is processing for bringing the ideal flicker reductionexposure time IdealFlkExpTime as close to the currently set shutterspeed CurTv as possible. By such processing, the exposure time forreducing flicker can be narrowed down to exposure times close to theuser-set shutter speed, for example, since CurTv falls betweenIdealFlkExpTime and PreIdealFlkExpTime.

In step S1207, the CPU 103 compares the absolute value of a differencebetween IdealFlkExpTime and CurTv with the absolute value of adifference between PreIdealFlkExpTime and CurTv. If the absolute valueof the difference between IdealFlkExpTime and CurTv is less than orequal to the absolute value of the difference between PreIdealFlkExpTimeand CurTv (NO in step S1207), this flicker reduction exposure timedetermination processing ends. The reason is that the value of thecurrently set ideal flicker reduction exposure time IdealFlkExpTime canbe determined to be closer to the current shutter speed CurTv than thevalue of PreIdealFlkExpTime is.

On the other hand, if the absolute value of the difference betweenIdealFlkExpTime and CurTv is greater than the absolute value of thedifference between PreIdealFlkExpTime and CurTv (YES in step S1207), theprocessing proceeds to step S1208. The reason is that the previously setideal flicker reduction exposure time PreIdealFlkExpTime can bedetermined to be closer to the current shutter speed CurTv than thecurrently set ideal flicker reduction exposure time IdealFlkExpTime is.In step S1208, the CPU 103 substitutes the previously set ideal flickerreduction exposure time PreIdealFlkExpTime into the ideal flickerreduction exposure time IdealFlkExpTime. This flicker reduction exposuretime determination processing ends.

By the flicker reduction exposure time determination processingaccording to the present embodiment described above, the exposure time(shutter speed) for reducing flicker can be determined to be a valueclose to the user-set shutter speed, for example. With such aconfiguration, images with reduced flicker effect can be obtained whilereducing differences from the intended imaging effect due to the useradjusting the shutter speed, for example.

FIGS. 13A and 13B are diagrams illustrating a method for setting theideal flicker reduction exposure time IdealFlkExpTime in the presence offlicker changing in light amount at a predetermined light amount changefrequency according to the present embodiment as an example. FIG. 13Aillustrates an example where the shutter speed is set to 1/5792.6 sec(CurTv=1/5792.6) by the user. FIG. 13B illustrates an example where theshutter speed is set to 1/250.5 sec (CurTv=1/250.5) by the user.

Suppose, for example, that the light amount change frequency of thedetected flicker is 540.0 Hz. In the example illustrated in FIG. 13A,the ideal flicker reduction exposure time IdealFlkExpTime is 1/540.0. Inthe example of FIG. 13B, the ideal flicker reduction exposure timeIdealFlkExpTime is 1/270.0 at the same flicker light amount changefrequency. Changes in the light amount of the flicker at integermultiple frequencies are the same. The effect of the flicker can thus bereduced as well if images of the object are captured at a shutter speedthat is lower than the reciprocal of the light amount change frequencyof the flicker and is the reciprocal of an integer multiple of theflicker frequency. If the user-set shutter speed is lower than or equalto the reciprocal of the light amount change frequency of the detectedflicker, a value having a smallest difference from the user-set shutterspeed among the reciprocals of integer multiples of the flickerfrequency can thus be determined to be the ideal flicker reductionexposure time IdealFlkExpTime.

Next, details of the shutter speed selection processing performed in theforegoing step S305 will be described with reference to FIG. 14. FIG. 14is a flowchart related to the shutter speed selection processingaccording to the first embodiment of the present invention. In stepS1401, the CPU 103 initially performs initialization processing forselecting a shutter speed from the shutter speed setting (index) tabledescribed above with reference to FIG. 2. Specifically, in step S1401,the CPU 103 sets a settable flicker reduction shutter speed SetPosFlkTvbased on the shutter speed setting table, with an index i=1. In thepresent embodiment, as illustrated in FIG. 2, the settable flickerreduction shutter speed SetPosFlkTv for the index i=1 is 1/8192.0 sec.

In step S1402, the CPU 103 increment the index i of the shutter speedsetting table by one. In step S1403, the CPU 103 compares the absolutevalue of a difference between SetPosFlkTv and the foregoing idealflicker reduction exposure time IdealFlkExpTime with the absolute valueof a difference between the shutter speed corresponding to the index i(hereinafter, referred to as shutter speed [i]) in the shutter speedsetting table and the ideal flicker reduction exposure timeIdealFlkExpTime. If the absolute value of the difference betweenSetPosFlkTv and IdealFlkExpTime is less than or equal to the absolutevalue of the difference between the shutter speed and IdealFlkExpTime(NO in step S1403), the processing proceeds to step S1405.

On the other hand, if the absolute value of the difference betweenSetPosFlkTv and IdealFlkExpTime is determined to be greater than theabsolute value of the difference between the shutter speed andIdealFlkExpTime (YES in step S1403), the processing proceeds to stepS1404. In step S1404, the CPU 103 selects the settable flicker reductionshutter speed SetPosFlkTv based on the result of the determination madein step S1403. Specifically, in step S1404, the CPU 103 sets thesettable flicker reduction shutter speed SetPosFlkTv to the shutterspeed corresponding to the current index i of the shutter speed settingtable. The processing proceeds to step S1405.

In step S1405, the CPU 103 determines whether the index i of the shutterspeed setting table is greater than or equal to a maximum index. If thecurrent index i is less than the maximum index (NO in step S1405), theprocessing returns to step S1402. The CPU 103 then repeats theprocessing of steps S1402 to S1405. In the present embodiment, themaximum index is 600 as illustrated in FIG. 2. If, in step S1405, thecurrent index i is determined to have reached the maximum index (YES instep S1405), the current SetPosFlkTv is selected as the settable flickerreduction shutter speed, and the shutter speed selection processingends.

In the foregoing example, the shutter speed selection processing isperformed for all the indexes that can be referred to in the shutterspeed setting table. However, this is not restrictive. For example, ifthe currently set shutter speed CurTv is obtained by the flickerreduction exposure time determination processing, the settable flickerreduction shutter speed SetPosFlkTv may be determined from the vicinityof the currently set shutter speed CurTv. Specifically, if a specificvalue is recorded as the currently set shutter speed CurTv, the CPU 103identifies the index corresponding to a shutter speed closest to CurTv.The CPU 103 can then determine differences of the shutter speedcorresponding to the index and the shutter speeds corresponding to otherindexes adjoining to the index from the ideal flicker reduction exposuretime IdealFlkExpTime, and determine the shutter speed that minimizes thedifference as the settable flicker reduction shutter speed SetPosFlkTv.This configuration is particularly effective in a case where a specificshutter speed is set by the user. The use of such a configuration canreduce processing time and processing load related to the shutter speedselection processing since deviations from the user-intended shutterspeed are small and the indexes to be compared are significantlyreduced.

By performing the foregoing shutter speed selection processing, ashutter speed that can effectively reduce the effect of the flickerdetected in advance can be selected from among the settable shutterspeeds of the camera main body 100. In other words, the camera main body100 according to the present embodiment can select (set) one of thesettable shutter speeds that is closest to the ideal shutter speedIdealFlkExpTime for reducing the effect of the detected flicker.

FIGS. 15A and 15B are diagrams illustrating a relative relationshipbetween the shutter speed selected by the shutter speed selectionprocessing according to the first embodiment of the present inventionand the ideal shutter speed for reducing the effect of flicker as anexample. In FIGS. 15A and 15B, the light amount change frequency of theflicker is assumed to be 540.0 Hz, and the ideal flicker reductionexposure time IdealFlkExpTime 1/540.0. FIG. 15A illustrates a case wherethe shutter speed CurTv currently set by the user is 1/5792.6. FIG. 15Billustrates a case where the shutter speed CurTv currently set by theuser is 1/250.5.

In FIG. 15A, a difference between Tv=1/546.4 indicated by an index of 58in the shutter speed setting table and Tv=1/540.0 that isIdealFlkExpTime is denoted by 458. In FIG. 15A, a difference betweenTv=1/534.7 indicated by an index of 59 in the shutter speed settingtable and Tv=1/540.0 that is IdealFlkExpTime is denoted by 459. In thecase illustrated in FIG. 15A, Tv=1/534.7 is selected as SetPosFlkTv bythe foregoing shutter speed selection processing since 459<458.

In FIG. 15B, a difference between Tv=1/273.2 indicated by an index of119 in the shutter speed setting table and Tv=1/270.0 that isIdealFlkExpTime is denoted by 4119. In FIG. 15B, a difference betweenTv=1/270.2 indicated by an index of 120 in the shutter speed settingtable and Tv=1/270.0 that is IdealFlkExpTime is denoted by 4120. In thecase illustrated in FIG. 15B, Tv=1/270.2 is selected as SetPosFlkTv bythe foregoing shutter speed selection processing since 4120<4119.

As described above, the camera main body 100 according to the presentembodiment can effectively detect the light amount change frequency offlicker occurring in the current imaging environment and the idealshutter speed (exposure time) for reducing the effect of the detectedflicker in as short a time as possible.

The camera main body 100 according to the present embodiment can set, asthe ideal shutter speed for reducing the effect of the flicker, ashutter speed with the shutter speed currently set by the user takeninto account. The camera main body 100 according to the presentembodiment can thus detect the shutter speed that can reduce the effectof the flicker while preventing a change from the user-intended exposurecondition and imaging effect as much as possible.

Moreover, the camera main body 100 according to the present embodimentcan automatically select (set) a shutter speed closest to the idealshutter speed that can reduce the effect of the flicker from among thesettable shutter speeds of the camera main body 100. The camera mainbody 100 according to the present embodiment can thus automaticallyselect (set) a shutter speed that can reduce the effect of the flickerwithout a need for the user to manually adjust the shutter speed.

Next, details of the display processing in the foregoing step S306according to the first embodiment of the present invention will bedescribed with reference to FIGS. 16A, 16B, and 17. FIGS. 16A and 16Bare diagrams illustrating a notification screen displayed on the displayunit 102 by the display processing according to the first embodiment ofthe present invention as an example.

FIG. 16A illustrates a case where flicker at 540.0 Hz is detected, CurTvis 1/5792.6, and SetPosFlkTv is 1/534.7. FIG. 16B illustrates a casewhere flicker at 540.0 Hz is detected, CurTv is 1/250.5, and SetPosFlkTvis 1/270.2. FIG. 17 is a diagram illustrating a notification screendisplayed by the display processing according to the first embodiment ofthe present invention in a case where no flicker is detected.

A detected flicker area 1601 displays information indicating the lightamount change frequency of the flicker detected based on the foregoingmethod (in the illustrated example, 540.0 Hz).

A selectable shutter speed area 1602 displays the settable flickerreduction shutter speed SetPosFlkTv determined based on the foregoingmethod (in FIG. 16A, 1/534.7; in FIG. 16B, 1/270.2).

A current shutter speed area 1603 displays the shutter speed of thecamera main body 100 currently set by the user's manual setting (in FIG.16A, 1/5792.6; in FIG. 16B, 1/250.5).

A first user selection icon 1604 displays an option to not consent tochange the shutter speed to the settable flicker reduction shutter speedSetPosFlkTv displayed on the notification screen. A second userselection icon 1605 displays an option to consent to change the shutterspeed to the settable flicker reduction shutter speed SetPosFlkTvdisplayed on the notification screen.

If no flicker at a predetermined level or more is detected by theflicker detection processing, a message 1701 indicating that no flickeris detected and an icon 1702 by using which the user can make aconfirmation input are displayed on the display unit 102 as illustratedin FIG. 17.

As described above, if flicker having a predetermined light amountchange frequency is detected by the flicker detection processing,various icons and messages such as illustrated in FIGS. 16A and 16B aredisplayed on the display unit 102 to prompt the user to change theshutter speed. Such a configuration can facilitate setting a shutterspeed that can reduce the effect of the flicker while reducing user'slabor of adjusting the shutter speed by a manual operation such that theeffect of the flicker can be reduced. The camera main body 100 accordingto the present embodiment can thus capture images with reduced effect offlicker over a wide range of light amount change frequencies withoutneeding complicated operations and reduce image unevenness due toflicker regardless of light sources.

The method for notifying the user of the light amount change frequencyof flicker and the shutter speed that can reduce the effect of theflicker and the method for changing the shutter speed are not limited tothe foregoing. In the foregoing example, the notification screen isdescribed to be displayed on the display unit 102. However, thenotification screen may be displayed on other display devices or anexternal device connected to the camera main body 100. The notificationmethod is not limited to image display, either. Various notificationunits may be used instead to issue a notification using voice guidance,changing the lighting state of a lamp (not illustrated) provided on thecamera main body 100, or changing the light color.

The camera main body 100 according to the present embodiment uses themethod for inquiring of the user whether to change the shutter speed tothe settable flicker reduction shutter speed SetPosFlkTv. However, thisis not restrictive. For example, the camera main body 100 may beconfigured to automatically change the shutter speed to the settableflicker reduction shutter speed SetPosFlkTv without the user's consent.The camera main body 100 may be configured to switch whether to inquireof the user about the change to the settable flicker reduction shutterspeed SetPosFlkTv based on the imaging mode.

If the imaging mode is an auto mode where the camera main body 100automatically determines parameters related to exposure control, thecamera main body 100 desirably automatically sets the settable flickerreduction shutter speed SetPosFlkTv. By contrast, if the imaging mode isa manual mode where the user manually sets the parameters (exposurecontrol values) related to exposure control, the method for inquiring ofthe user whether to change the shutter speed is desirably used as in theforegoing example.

The camera main body 100 according to the present embodiment has beendescribed to use the electronic shutter preferentially. However, this isnot restrictive. For example, the camera main body 100 may be configuredto control the exposure time of the image sensor 101 based on a givenshutter speed using the mechanical shutter 104.

In capturing an image of an object using the mechanical shutter 104 withthe shutter speed set high, the running timing of the mechanical shutter104 can deviate from the ideal exposure time depending on variations inthe physical characteristics of the mechanical shutter 104 andenvironmental differences. In other words, if the shutter speed set asthe settable flicker reduction shutter speed SetPosFlkTv is high, thecamera main body 100 is sometimes unable to capture an image of theobject with the exposure time that can properly reduce the flickereffect.

In the case of adjusting the exposure time using the mechanical shutter104, the camera main body 100 may therefore be configured to limit thesettable flicker reduction shutter speed SetPosFlkTv so that the shutterspeed becomes shorter than or equal to a predetermined speed. Thepredetermined speed (shutter speed) may have a value such that theamount of deviation (i.e., error) between the ideal exposure time andthe timing of exposure and light-shielding of the image sensor 101 dueto the driving of the mechanical shutter 104 falls within apredetermined range. In the present embodiment, the shutter speed thatis the predetermined speed is set to 1/4000 sec as an example. In such acase, the settable flicker reduction shutter speed SetPosFlkTv can bedetermine using the foregoing shutter speed setting table within therange excluding the indices corresponding to the shutter speed of 1/4000sec or less, or using new table data.

The camera main body 100 according to the present embodiment may beconfigured to make a dynamic adjustment regarding whether to use theelectronic shutter or the mechanical shutter 104 based on the value ofthe settable flicker reduction shutter speed SetPosFlkTv. For example,if the shutter speed is higher than 1/4000 sec, only the electronicshutter may be made usable. At other shutter speeds, both the electronicshutter and the mechanical shutter 104 may be made usable.

In the foregoing first embodiment, a description is given of aconfiguration where only one settable flicker reduction shutter speedSetPosFlkTv is notified to the user. In a second embodiment, aconfiguration for notifying the user of a plurality of options for thesettable flicker reduction shutter speed SetPosFlkTv will be describedwith reference to FIG. 18. A configuration of a camera main body 100that is an image capturing apparatus according to the presentembodiment, a lens unit 200, and a light emitting device 300, and abasic driving method thereof are similar to those of the foregoing firstembodiment. The components will thus be denoted by the same referencenumerals, and a description thereof will be omitted. The presentembodiment is different from the foregoing first embodiment in thedisplay processing of step S306.

FIGS. 18A and 18B are diagrams each illustrating a notification screendisplayed on the display unit 102 by the display processing according tothe second embodiment of the present invention as an example. FIG. 18Aillustrates a case where flicker at 540.0 Hz is detected, CurTv is1/5792.6, and SetPosFlkTv is 1/534.7. FIG. 18B illustrates a case whereflicker at 540.0 Hz is detected, CurTv is 1/250.5, and SetPosFlkTv is1/270.2.

A detected flicker area 1801 displays information indicating the lightamount change frequency of the flicker detected. A current shutter speedarea 1802 displays the shutter speed CurTv of the camera main body 100that is currently set by the user's manual setting (in FIG. 18A,1/5792.6; in FIG. 18B, 1/250.5).

A selectable shutter speed first candidate area 1803 displays thesettable flicker reduction shutter speed SetPosFlkTv determined based onthe method described in the first embodiment as a first candidateshutter speed selectable by the user. FIG. 18A illustrates a case wherethe selectable shutter speed first candidate area 1803 displays 1/534.7,and FIG. 18B 1/270.2.

A selectable shutter speed second candidate area 1804 displays theshutter speed corresponding to an index at which the difference fromIdealFlkExpTime is the second smallest after SetPosFlkTv as a secondcandidate shutter speed selectable by the user. FIG. 18A illustrates acase where the selectable shutter speed second candidate area 1804displays 1/546.4, and FIG. 18B 1/273.2.

A selectable shutter speed alternative candidate area 1805 displays ashutter speed, if any, that provides a higher effect of reducing theeffect of the flicker regardless of the difference from CurTv as anothercandidate shutter speed selectable by the user. FIG. 18A illustrates anexample where the selectable shutter speed alternative candidate area1805 displays 1/270.2 that is close to Tv=1/270.0, i.e., twiceTv=1/540.0 that is IdealFlkExpTime. In the case where the flicker at540.0 Hz is detected, Tv=1/270.2 has a greater difference from CurTv buthas a higher effect of reducing the effect of the flicker thanSetPosFlkTv (1/534.7).

Shutter speed selection icons 1806 are displayed for the user to selecta selectable candidate shutter speed. A white arrow icon indicates theabsence of a candidate shutter speed. A black arrow icon indicates thepresence of a candidate shutter speed. In FIG. 18A, there is no otherSetPosFlkTv candidate for the selectable shutter speed first candidatearea 1803, and a white arrow icon is thus displayed beside theselectable shutter speed first candidate area 1803. The same applies tothe example illustrated in FIG. 18B. In FIG. 18A, there is anothercandidate shutter speed (1/180.0) having a high effect of reducing theeffect of the flicker for the selectable shutter speed alternativecandidate area 1805, and a black arrow icon is thus displayed beside theselectable shutter speed alternative candidate area 1805. In FIG. 18B,there also is another candidate shutter speed (1/135.0) having a higheffect of reducing the effect of the flicker for the selectable shutterspeed alternative candidate area 1805, and a black arrow icon is thusdisplayed beside the selectable shutter speed alternative candidate area1805.

As described above, the camera main body 100 according to the presentembodiment can notify the user of a plurality of candidates for theshutter speed that can reduce the effect of flicker, aside fromSetPosFlkTv. Such a configuration can facilitate setting a user-desiredshutter speed among a plurality of candidates that can reduce the effectof flicker while reducing user's labor of adjusting the shutter speed bya manual operation so that the effect of the flicker can be reduced. Thecamera main body 100 according to the present embodiment can thuscapture images with reduced effect of flicker over a wide range of lightamount change frequencies without needing complicated operations andreduce image unevenness due to flicker regardless of light sources.

In the foregoing first embodiment, a description is given of an examplewhere the specific notification screen is displayed on the display unit102. In a third embodiment, a configuration for performing flickerdetection processing during a live view display for successivelydisplaying captured images will be described with reference to FIG. 19.A configuration of a camera main body 100 that is an image capturingapparatus according to the present embodiment, a lens unit 200, and alight emitting device 300, and a basic driving method thereof aresimilar to those of the foregoing first embodiment. The components willthus be denoted by the same reference numerals, and a descriptionthereof will be omitted.

FIG. 19 is a diagram illustrating a screen for transitioning to theflicker reduction processing during a live view display according to thethird embodiment of the present invention as an example. While thepresent embodiment deals with a configuration for providing the liveview display on the display unit 102, the camera main body 100 may beconfigured to provide the live view display on a not-illustratedelectronic viewfinder. During the live view display, the image sensor101 performs sampling (charge accumulation) for flicker detection attiming different from the charge accumulation timing for obtainingcaptured images for use in the live view display.

As illustrated in FIG. 19, a flicker detection icon 1901 is an icon fordisplaying the detection of flicker when the flicker is detected by theflicker detection processing described above in the foregoing firstembodiment. If flicker detection processing different from the foregoingflicker detection processing can be performed, the flicker detectionicon 1901 may be used to provide a similar display. Alternatively, thecamera main body 100 may be configured to use an icon different from theflicker detection icon 1901 for the purpose. An example of the differentflicker detection processing may be processing for detecting specificflicker (100 Hz or 120 Hz) occurring due to a change in the period ofthe commercial power source.

The flicker detection icon 1901 may be configured to be displayed onlywhen flicker is detected. The flicker detection icon 1901 may beconstantly displayed and the display content may be changed (updated)depending on whether flicker is detected. Moreover, the camera main body100 may be configured so that the CPU 103 controls execution of theflicker detection processing if the flicker detection icon 1901 ispressed by the user.

A flicker reduction menu transition icon 1902 is an icon for causing thedisplay content of the display unit 102 to transition to thenotification screen described in the first and second embodiments if theuser makes a pressing operation (including a touch operation) on theflicker reduction menu transition icon 1902. In other words, the cameramain body 100 according to the present embodiment can transitiondirectly to the notification screen during a live view display withoutthe user going through another user interface such as a menu screen.

As described above, the camera main body 100 according to the presentembodiment can implement transition to detection of flicker changing inlight amount over a wide range of frequency and capturing of images withreduced effect of the flicker even in a state of capturing images of anobject, like during a live view display, using the user's simpleoperation. Such a configuration can facilitate setting a user-desiredshutter speed among a plurality of candidates that can reduce the effectof the flicker while reducing the number of user's manual operationsrelated to the flicker detection. The camera main body 100 according tothe present embodiment can thus capture images with reduced effect offlicker over a wide range of light amount change frequencies withoutneeding complicated operations and reduce image unevenness due toflicker regardless of light sources.

In the foregoing first embodiment, the flicker reduction exposure timedetermination processing performed in a case where the current shutterspeed CurTv is set in advance is described. In a fourth embodiment,flicker reduction exposure time determination processing performed in acase where a specific shutter speed (CurTv) is not set by, e.g., theuser's manual operations will be described. A configuration of a cameramain body 100 that is an image capturing apparatus according to thepresent embodiment, a lens unit 200, and a light emitting device 300,and a basic driving method thereof are similar to those of the foregoingfirst embodiment. The components will thus be denoted by the samereference numerals, and a description thereof will be omitted.

Aside from the foregoing auto mode and manual mode, the settable imagingmodes of the camera main body 100 include priority modes where the usermanually sets an exposure control value and the other exposure controlvalues are automatically set. Among examples of settable priority modesof the camera main body 100 according to the present embodiment is ashutter speed priority mode where the user can manually set the shutterspeed.

For example, in an automatic exposure control state where the imagingmode of the camera main body 100 is set to the auto mode, the shutterspeed is not freely set by the user. In the flicker reduction exposuretime determination processing according to the foregoing firstembodiment, determination of the ideal flicker reduction exposure timeIdealFlkExpTime in consideration of the current shutter speed CurTv isnot particularly needed.

In the present embodiment, the ideal flicker reduction exposure timeIdealFlkExpTime is therefore determined based on a result ofdetermination as to whether the current shutter speed CurTv is a shutterspeed CurUserTv manually set by the user. Specifically, the CPU 103 ofthe camera main body 100 according to the present embodiment determineswhether CurTv CurUserTv. If CurTv CurUserTv, the CPU 103 sets a shutterspeed that minimizes the difference from the ideal flicker reductionexposure time IdealFlkExpTime in the shutter speed setting table as thesettable flicker reduction shutter speed SetPosFlkTv.

If such a configuration is applied to the foregoing flicker reductionexposure time determination processing, processing of step S1203, stepS1205, and the subsequent steps is not needed. Here, the ideal flickerreduction exposure time IdealFlkExpTime is set to the exposure time thatis the reciprocal of the light amount change frequency of the flickerdetected. However, this is not restrictive. For example, as describedabove in the second embodiment, the camera main body 100 may beconfigured to set the settable flicker reduction shutter speedSetPosFlkTv so that a difference from the value obtained by multiplyingthe ideal flicker reduction exposure time IdealFlkExpTime by an integerN is minimized to increase the effect of reducing the flicker effect. Insuch a case, the CPU 103 repeats the comparison between a shutter speedsettable based on the shutter speed setting table and the value of aninteger multiple of the ideal flicker reduction exposure timeIdealFlkExpTime. The CPU 103 then selects the shutter speed thatminimizes the difference as the settable flicker reduction shutter speedSetPosFlkTv.

In the foregoing first and second embodiments assuming that CurTv is setin advance, the value of the settable flicker reduction shutter speedSetPosFlkTv is determined by taking into account differences from CurTv.However, this is not restrictive. For example, the camera main body 100may compare differences of the reciprocals of the light amount changefrequency of the flicker and the integer multiples thereof from ashutter speed corresponding to each index, and set the value thatprovides the minimum difference as the settable flicker reductionshutter speed SetPosFlkTv. In such a case, a range of light amountchange frequencies of flicker that can be reduced by the settableshutter speeds of the camera main body 100 may be defined, and only thereciprocals of frequencies within the range may be compared.

The determination regarding whether CurTv≠CurUserTv in the presentembodiment may be made depending on the currently set imaging mode ofthe camera main body 100.

As described above, the camera main body 100 according to the presentembodiment can calculate an optimum shutter speed that can effectivelyreduce the effect of flicker changing in light amount over a wide rangeof frequencies even if a specific shutter speed is not set by the user.Such a configuration can facilitate setting a shutter speed that canmost effectively reduce the effect of the flicker without needing theuser's complicated operations regardless of the imaging condition of thecamera main body 100.

The camera main body 100 according to the present embodiment can thuscapture images with reduced effect of flicker over a wide range of lightamount change frequencies without needing complicated operations andreduce image unevenness due to flicker regardless of light sources.

In the foregoing first embodiment, the flicker reduction processingduring imaging of an object in obtaining a still image is described. Ina fifth embodiment, flicker reduction processing during imaging of anobject in obtaining a moving image will be described. A configuration ofa camera main body 100 that is an image capturing apparatus according tothe present embodiment, a lens unit 200, and a light emitting device300, and a basic driving method thereof are similar to those of theforegoing first embodiment. The components will thus be denoted by thesame reference numerals, and a description thereof will be omitted.

In the case of obtaining a moving image, settable shutter speeds arelimited by the update cycle of the frames constituting the moving image.In other words, some shutter speeds may not be set depending on therecording frame rate of the moving image.

Moreover, some settable shutter speeds are not desirable as a shutterspeed in obtaining a moving image. For example, high shutter speedresults in a short exposure time in one frame. Since temporaldifferences between the frames constituting the moving image increase,the motion of the object in the moving image does not look smooth.

In the present embodiment, the flicker reduction processing in obtaininga moving image is thus configured so that a longest exposure timesettable at the set frame rate of the moving image is determined to bethe ideal flicker reduction exposure time IdealFlkExpTime. In somecases, the ideal flicker reduction exposure time IdealFlkExpTime is notthe same as a settable flicker reduction shutter speed. If the settableflicker reduction shutter speed SetPosFlkTv selected based on the newlydetermined ideal flicker reduction exposure time IdealFlkExpTime has avalue not settable at the current frame rate of the moving image, thesettable flicker reduction shutter speed SetPosFlkTv is adjustedaccordingly. Specifically, the settable flicker reduction shutter speedSetPosFlkTv is set to a shutter speed closest to the newly determinedideal flicker reduction exposure time IdealFlkExpTime among the shutterspeeds not limited by the frame rate of the moving image.

In the present embodiment, the processing related to the comparison withCurTv in the foregoing flicker reduction exposure time determinationprocessing can be omitted. However, the camera main body 100 may beconfigured to use the longest of the integer multiples of the idealflicker reduction exposure time IdealFlkExpTime of which differencesfrom the current shutter speed CurTv fall within a predetermined time asthe final ideal flicker reduction exposure time IdealFlkExpTime.

As described above, even in capturing images of an object to obtain amoving image, the camera main body 100 according to the presentembodiment can detect flicker changing in light amount over a wide rangeof frequencies and capture the images with reduced effect of the flickerwhile preventing a drop in the quality of the moving image. With such aconfiguration, the camera main body 100 according to the presentembodiment can facilitate setting a shutter speed that can reduce theeffect of flicker both in obtaining a still image and in obtaining amoving image without needing the user's additional operation. The cameramain body 100 according to the present embodiment can thus captureimages with reduced effect of flicker over a wide range of light amountchange frequencies without needing complicated operations and reduceimage unevenness due to flicker regardless of light sources.

In the foregoing first embodiment, a configuration for setting the idealflicker reduction exposure time IdealFlkExpTime to reduce a differencefrom the current shutter speed CurTv is described. In a sixthembodiment, a method for setting an ideal flicker reduction exposuretime IdealFlkExpTime that can reduce the effects of camera shakes andobject motion will be described. A configuration of a camera main body100 that is an image capturing apparatus according to the presentembodiment, a lens unit 200, and a light emitting device 300, and abasic driving method thereof are similar to those of the foregoing firstembodiment. The components will thus be denoted by the same referencenumerals, and a description thereof will be omitted.

In general, the lower the shutter speed (the longer the exposure time),the more likely an image including a blurred object is to be obtaineddue to the effects of camera shakes and object motion during imaging. Inother words, to reduce such motion blurs occurring in an image, theshutter speed is desirably as high as possible.

The camera main body 100 according to the present embodiment determinesthe ideal flicker reduction exposure time IdealFlkExpTime to be shorterthan a predetermined exposure time by the flicker reduction exposuretime determination processing according to the foregoing firstembodiment. The predetermined exposure time may have any value that canreduce the effect of object motion in the image. In the presentembodiment, the predetermined exposure time is 1/125 sec, for example.

In the present embodiment, the processing related to the comparison withCurTv in the foregoing flicker reduction exposure time determinationprocessing can be omitted. However, the camera main body 100 may beconfigured to determine the ideal flicker reduction exposure timeIdealFlkExpTime to be an exposure time that is one of integer multiplesof the ideal flicker reduction exposure time IdealFlkExpTime of whichthe difference from the current shutter speed CurTv falls within apredetermined range and is shorter than the predetermined exposure time.

The camera main body 100 may also be configured to set an ideal flickerreduction exposure time IdealFlkExpTime that reduces the effect ofobject motion if a blur-reducing condition (such as a specific imagingscene (sport scene)) is set as the imaging condition of the camera mainbody 100.

As described above, the camera main body 100 according to the presentembodiment can detect flicker changing in light amount over a wide rangeof frequencies and capture images with reduced effect of flicker whilereducing the effect of object motion in the images. With such aconfiguration, the camera main body 100 according to the presentembodiment can facilitate setting a shutter speed that can reduce theeffect of flicker without needing the user's additional operation evenif a specific imaging condition intended to reduce blur is set. Thecamera main body 100 according to the present embodiment can thuscapture images with reduced effect of flicker over a wide range of lightamount change frequencies without needing complicated operations andreduce image unevenness due to flicker regardless of light sources.

In a seventh embodiment, flicker reduction processing during lightemission imaging using a light emitting device 300 will be described. Aconfiguration of a camera main body 100 that is an image capturingapparatus according to the present embodiment, a lens unit 200, and thelight emitting device 300, and a basic driving method thereof aresimilar to those of the foregoing first embodiment. The components willthus be denoted by the same reference numerals, and a descriptionthereof will be omitted.

In the light emission imaging using the light emitting device 300,settable flicker reduction shutter speeds are limited by synchronizationspeed determined based on the timing of exposure of the image sensor 101and the timing of light emission from the light emitting device 300. Inother words, the camera main body 100 according to the presentembodiment sets a settable flicker reduction shutter speed SetPosFlkTvfrom among candidate shutter speeds lower than the synchronization speedof the light emitting device 300. Specifically, the CPU 103 determineswhether to perform the light emission imaging using the light emittingdevice 300. If the light emission imaging is determined to be performed,the CPU 103 limits shutter speeds selectable in the shutter speedsetting table to a range lower than the synchronization speed of thelight emitting device 300.

In the present embodiment, the processing related to the comparison withCurTv in the foregoing flicker reduction exposure time determinationprocessing can be omitted. However, the camera main body 100 may beconfigured to use one of integer multiples of the ideal flickerreduction exposure time IdealFlkExpTime of which the difference from thecurrent shutter speed CurTv is the smallest and that is less than thesynchronization speed of the light emitting device 300 as the finalideal flicker reduction exposure time IdealFlkExpTime.

As described above, the camera main body 100 according to the presentembodiment can detect flicker changing in light amount over a wide rangeof frequencies and capture images with reduced effect of flicker whilemaintaining a state where the object is appropriately illuminated evenduring the light emission imaging using the light emitting device 300.With such a configuration, the camera main body 100 according to thepresent embodiment can facilitate setting a shutter speed that canreduce the effect of flicker during the light emission imaging withoutneeding the user's additional operation. The camera main body 100according to the present embodiment can thus capture images with reducedeffect of flicker over a wide range of light amount change frequencieswithout needing complicated operations and reduce image unevenness dueto flicker regardless of light sources.

In an eighth embodiment, a detection method for reducing erroneousdetection of flicker in addition to the flicker detecting methoddescribed in the first embodiment will be described. Initially, samplingof captured images obtained by the rolling shutter method will bedescribed with reference to FIG. 20.

FIG. 20 is a diagram illustrating a method for sampling captured imagesbased on images successively obtained by the rolling shutter method asan example.

As illustrated in FIG. 20, captured images obtained by the rollingshutter method are divided in the vertical direction of the images andthe image signal is analyzed in each of the divided areas, whereby theimage signal can be sampled at finer (faster) cycles than the imagingcycle of the captured images. FIG. 20 illustrates an example where eachof images captured at an imaging cycle of 100 fps is vertically dividedinto N areas. With a rolling shutter read time as R [ms], each image issampled N times in a period of R [ms], meaning that the image signal forflicker detection can be sampled at periods of R/N [ms]. Such aconfiguration enables detection of flicker changing in light amount athigh frequencies. Meanwhile, the image signal for flicker detection issampled at an imaging period of 10 ms in a macro perspective since theimaging cycle of the undivided captured images is 100 fps. In otherwords, if the method for dividing a captured image into a plurality ofareas to obtain finer image signals for flicker detection is used asdescribed above, a first sampling period for obtaining the capturedimages themselves is intermingled with a second sampling period of R/N[ms] at which each captured image is divided.

Suppose that images of an object blinking at a predetermined frequency K[Hz] are captured at an imaging cycle of 100 fps, and flicker isdetected based on the captured images. In such a case, the analysisresult can peak at K±100 [Hz] in addition to the peak indicated by theflicker level related to the frequency of K [Hz].

FIG. 21 is a diagram illustrating a change in the flicker level in thepresence of a plurality of intermingled sampling periods as an example.As illustrated in FIG. 21, the presence of two intermingled samplingperiods causes a beat phenomenon. It can be seen that there is aplurality of rises in the flicker level other than at the actual flickerfrequency K [Hz]. The beat phenomenon typically refers to a phenomenonwith two waves where another frequency due to superposition of the twowaves is observed. In flicker level detection, the correct flickerfrequency cannot be detected because of the beat phenomenon. Thefollowing Eq. 6 is an equation for specifically describing thephenomenon:

f _(B) =|f ₁ −f ₂ |⇔f ₁ =f ₂ ±f _(B)  (Eq. 6)

Here, f₂ is the blinking frequency of the object, and f₁ is the observedfrequency. Due to the beat phenomenon caused by the presence of the twointermingled sampling periods, the observed frequency f₁ affected byf_(B) is f₂±f_(B), where f_(B) is the imaging frequency (imaging cycle).The correct flicker frequency thus cannot be detected, ending up witherroneous detection.

Methods for addressing such an issue will be specifically described. Afirst method is to change the combination of the imaging cycle (framerate) used to obtain captured images and the frequency of the flicker tobe analyzed from in the foregoing embodiment. For example, if theblinking frequency f₂ of the object is detected at the imaging frequencyf_(B), captured images obtained at an imaging cycle other than f_(B) canbe used in analyzing the blinking frequencies of flicker f₂±f_(B). Thiseliminates the effect of the beat phenomenon since the detection resultsat the imaging frequency f_(B) are not used in the situation where thefrequencies f₂±f_(B) can be observed.

A second method is to reduce the effect of the two sampling periods. Inthis second method, reading of the next image is adjusted to startimmediately after reading of the current image. In other words, theshorter a vertical blanking period, the smaller the effect of the firstsampling period. If the vertical blanking interval is 0, the effect ofthe first sampling period is theoretically minimized.

As the foregoing second method, the reading time is thus adjusted toreduce the vertical blanking interval. Specifically, the imaging cyclesfor detection are changed to faster cycles (frame rates). FIG. 22 is adiagram illustrating a case where the imaging cycles of captured imagesto be used for flicker detection described in FIG. 5 are shifted tofaster cycles as an example FIG. 23 is a diagram illustrating a casewhere the imaging cycles of captured images to be used for flickerdetection described in FIG. 6 are shifted to faster cycles as anexample. By shifting the imaging cycles to faster cycles as illustratedin FIGS. 22 and 23, the effect of the occurrence of the first samplingperiods can be reduced and the peaks in the flicker level due to thefrequencies f₂±f_(B) can be reduced. Instead of shifting the n imagingcycles to one step faster as illustrated in FIGS. 22 and 23, the cameramain body 100 may be configured to shift the entire n imaging cycles tofaster imaging cycles.

A third method is to determine the blinking frequency of the object byusing the peak in the flicker level at f₂ [Hz] and the peaks in theflicker level at f₂±f_(B) [Hz]. In such a case, the frequency thatmaximizes the flicker level will not be simply determined to be theblinking frequency of the object (the light amount change frequency ofthe flicker). In the third method, if significant rises like the threepeaks at the frequencies f₂ [Hz] and f₂±f_(B) [Hz] are detected as achange in the flicker level, the frequency f₂ that is the median of thethree frequencies is determined to be the blinking frequency of theobject (the light amount change frequency of the flicker). If such aconfiguration is employed, flicker over the frequencies of f₂ [Hz] andf₂±f_(B) [Hz] is detected based on captured images obtained at theimaging frequency f_(B). This increases calculation load compared to theforegoing first embodiment. If imaging cycles and detection targetfrequencies are arbitrarily combined as illustrated in FIGS. 5B and 6B,the frequencies f₂±f_(B) [Hz] can be outside the detection target rangeof the imaging frequency (imaging cycle) f_(B). Detecting the range offrequencies of flicker to be detected using all the n imaging cyclesentails an extremely large amount of calculation, whereas the thirdmethod can be used to accurately detect flicker if sufficientcalculation cost is available or if there is provided a processordedicated for calculation. In other words, the light amount changefrequency of flicker can be detected by analyzing the flicker level overall the detection target frequencies using each of the n imaging cycles.

While the embodiments of the present invention have been describedabove, the present invention is not limited to such embodiments, andvarious modifications and changes may be made within the gist thereof.For example, in the foregoing embodiments, digital cameras are describedas examples of the image capturing apparatuses in which the presentinvention is implemented. However, this is not restrictive. For example,image capturing apparatuses other than digital cameras may be employed.Examples include a digital video camera, a portable device such as asmartphone, a wearable terminal, an on-vehicle camera, and a securitycamera.

In the foregoing embodiments, configurations that can detect and reduceflicker over a wide range of frequencies regardless of light sourceshave been described. However, this is not restrictive. For example, aspecific light source may be specified in advance, and the imagecapturing apparatus may be configured to detect flicker in a frequencyrange where the flicker is likely to occur. For example, like theshutter speed setting table illustrated in FIG. 2, table data may beprepared for each light source (or each group of similar light sources).The image capturing apparatus then may be configured to limit theshutter speed to those likely to be set in each piece of table data byreferring to the light amount change frequency of the light source. Withsuch a configuration, a shutter speed that can reduce the effect offlicker can be efficiently set based on flicker likely to occur fromeach light source. This can reduce the data amount of the table data asmuch as possible while effectively reducing the effect of flicker.

An image capturing apparatus according to an embodiment of the presentinvention may be configured so that the user can select whether toperform the flicker detecting method and the method for reducing theeffect of flicker described in each of the foregoing embodiments as oneof the settable modes or menu settings of the camera main body 100. Forexample, the camera main body 100 may have a first mode where flickerchanging in luminance at a high frequency of 200 Hz or more can bedetected, and be configured so that the user can freely switch whetherto transition to the first mode.

Moreover, a camera main body 100 according to an embodiment of thepresent invention may have a second mode for detecting flicker at thefrequencies (100 Hz and 120 Hz) resulting from the commercial powersource frequencies discussed in Japanese Patent Application Laid-OpenNo. 2014-220763 and reducing the effect of the flicker. In such a case,the camera main body 100 may be configured to perform the methods fordetecting and reducing flicker at high frequencies described in theforegoing embodiments only if the foregoing first mode is set betweenthe foregoing first and second modes.

In the foregoing embodiments, the operation of the entire imagecapturing apparatus is controlled by the components of the imagecapturing apparatus cooperating with each other, with the CPU 103playing the central role. However, this is not restrictive. For example,a (computer) program based on the procedures illustrated in theforegoing diagrams may be stored in the ROM of the camera main body 100in advance. A microprocessor such as the CPU 103 may be configured toexecute the program to control the operation of the entire imagecapturing apparatus. The program is not limited to any particular formas long as the functions of the program are provided. Examples includeobject code, a program to be executed by an interpreter, and script datato be supplied to an operating system (OS). Examples of a recordingmedium for supplying the program may include magnetic recording mediasuch as a hard disk and a magnetic tape, and optical/magneto-opticalrecording media.

In the foregoing embodiments, digital cameras are described as examplesof the image capturing apparatuses in which the present invention isimplemented. However, this is not restrictive. For example, variousimage capturing apparatuses may be employed, including a digital videocamera, a portable device such as a smartphone, a wearable terminal, anda security camera.

Other Embodiments

An embodiment of the present invention can be implemented by supplying aprogram for implementing one or more functions of the foregoingembodiments to a system or an apparatus via a network or a recordingmedium, and reading and executing the program by one or more processorsin a computer of the system or apparatus. A circuit for implementing theone or more functions (such as an ASIC) may be used for implementation.

Other Embodiments

Embodiment(s) of the present invention can also be realized by acomputer of a system or apparatus that reads out and executes computerexecutable instructions (e.g., one or more programs) recorded on astorage medium (which may also be referred to more fully as a‘non-transitory computer-readable storage medium’) to perform thefunctions of one or more of the above-described embodiment(s) and/orthat includes one or more circuits (e.g., application specificintegrated circuit (ASIC)) for performing the functions of one or moreof the above-described embodiment(s), and by a method performed by thecomputer of the system or apparatus by, for example, reading out andexecuting the computer executable instructions from the storage mediumto perform the functions of one or more of the above-describedembodiment(s) and/or controlling the one or more circuits to perform thefunctions of one or more of the above-described embodiment(s). Thecomputer may comprise one or more processors (e.g., central processingunit (CPU), micro processing unit (MPU)) and may include a network ofseparate computers or separate processors to read out and execute thecomputer executable instructions. The computer executable instructionsmay be provided to the computer, for example, from a network or thestorage medium. The storage medium may include, for example, one or moreof a hard disk, a random-access memory (RAM), a read only memory (ROM),a storage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™,a flash memory device, a memory card, and the like.

While the present invention has been described with reference toembodiments, it is to be understood that the invention is not limited tothe disclosed embodiments but is defined by the scope of the followingclaims.

This application claims the benefit of Japanese Patent Applications No.2021-028810, filed Feb. 25, 2021, and No. 2021-138847, filed Aug. 27,2021, which are hereby incorporated by reference herein in theirentirety.

What is claimed is:
 1. An image capturing apparatus comprising: an image sensor; and at least one processor or circuit configured to perform the operations of the following units: a driving control unit configured to control driving of the image sensor; and a flicker detection unit configured to detect flicker based on a signal output from the image sensor, the flicker being a periodic change in a light amount of an object, wherein the driving control unit is configured to, if the image sensor outputs a flicker detection signal to be used in detecting the flicker, control the driving of the image sensor at n different frame rates, n being a natural number greater than or equal to 3, wherein a least common multiple of the n frame rates used in detecting the flicker is not same as any of the n frame rates, and wherein the flicker detection unit is configured to detect the flicker based on the flicker detection signal obtained at each of the n frame rates.
 2. The image capturing apparatus according to claim 1, wherein the n frame rates used in detecting the flicker are cycles different from each other in steps of 2 to one-nth power as a predetermined interval.
 3. The image capturing apparatus according to claim 1, wherein the n frame rates used in detecting the flicker are cycles different from each other in steps of 100/n [%] as a predetermined interval.
 4. The image capturing apparatus according to claim 1, wherein each of the n frame rates used in detecting the flicker is a rate higher than or equal to 100 fps.
 5. The image capturing apparatus according to claim 1, wherein the least common multiple of the n frame rates used in detecting the flicker is greater than or equal to
 10000. 6. The image capturing apparatus according to claim 1, wherein the least common multiple of the n frame rates used in detecting the flicker is greater than a reciprocal of a fastest settable shutter speed of the image capturing apparatus.
 7. The image capturing apparatus according to claim 1, wherein the flicker detection unit is configured to detect flicker within a predetermined range of light amount change frequencies, and detect the flicker based on the flicker detection signal obtained by driving the image sensor at one of the n frame rates for each of the light amount change frequencies of the flicker to be detected.
 8. The image capturing apparatus according to claim 7, wherein the light amount change frequencies of the flicker to be detected at the respective n frame rates are different in steps of a predetermined interval.
 9. The image capturing apparatus according to claim 7, wherein the flicker detection unit is configured to, if the light amount change frequency of the flicker to be detected is F±D [Hz], detect the flicker based on the flicker detection signal obtained by driving the image sensor at a frame rate other than D, where D is one of the n frame rates, and F is one of the light amount change frequencies of the flicker to be detected.
 10. The image capturing apparatus according to claim 7, wherein the flicker detection unit is configured to, if the light amount change frequency of the flicker to be detected is F±D [Hz], detect the flicker based on the flicker detection signal obtained by driving the image sensor at a frame rate of D, where D is one of the n frame rates, and F is one of the light amount change frequencies of the flicker to be detected.
 11. The image capturing apparatus according to claim 7, wherein the driving control unit is configured to control the driving of the image sensor so that images are captured for one period or more of each of the light amount change frequencies of the flicker to be detected at each of the n frame rates used in detecting the flicker.
 12. The image capturing apparatus according to claim 1, wherein the driving control unit is configured to change the number n of frame rates used in detecting the flicker based on a range of light amount change frequencies of the flicker to be detected.
 13. The image capturing apparatus according to claim 1, wherein the driving control unit is configured to change the n frame rates used in detecting the flicker based on a range of light amount change frequencies of the flicker to be detected.
 14. The image capturing apparatus according to claim 1, wherein the flicker detection unit is configured to, if no flicker is detected based on the flicker detection signal, perform control to change the n frame rates used in detecting the flicker.
 15. The image capturing apparatus according to claim 1, further comprising a notification unit configured to make a notification of a light amount change frequency of the flicker detected by the flicker detection unit.
 16. The image capturing apparatus according to claim 1, wherein the image capturing apparatus is configured to detect flicker changing in the light amount of the object at a light amount change frequency of 200 Hz or more, and wherein the flicker detection unit is configured to, in detecting the flicker changing in the light amount of the object at the light amount change frequency of 200 Hz or more, detect the flicker based on the flicker detection signal obtained at each of the n frame rates.
 17. A flicker detecting method comprising: controlling driving of an image sensor; and detecting flicker based on a signal output from the image sensor, the flicker being a periodic change in a light amount of an object, wherein if the image sensor outputs a flicker detection signal to be used in detecting the flicker, the driving of the image sensor is controlled at n different frame rates, n being a natural number greater than or equal to 3, wherein a least common multiple of the n frame rates used in detecting the flicker is not same as any of the n frame rates, and wherein a light amount change frequency of the flicker is detected based on the flicker detection signal obtained at each of the n frame rates.
 18. A non-transitory computer-readable storage medium storing a program for causing a processor to execute a flicker detecting method, the flicker detecting method comprising: controlling driving of an image sensor; and detecting flicker based on a signal output from the image sensor, the flicker being a periodic change in a light amount of an object, wherein if the image sensor outputs a flicker detection signal to be used in detecting the flicker, the driving of the image sensor is controlled at n different frame rates, n being a natural number greater than or equal to 3, wherein a least common multiple of the n frame rates used in detecting the flicker is not same as any of the n frame rates, and wherein a light amount change frequency of the flicker is detected based on the flicker detection signal obtained at each of the n frame rates. 